import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

  const routes = [
    {
      path: '/',
      redirect: 'home',
    },
  {
    path: '/',
    name: 'index',
    component: () => import(/* webpackChunkName: "about" */ '../views/index/index.vue'),
    children:[
      {
        path: '/home',
        name: 'home',
        component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue'),
        meta:{
          title:'首页'
        }
      },
      {
        path: '/experience',
        name: 'experience',
        component: () => import(/* webpackChunkName: "about" */ '../views/experience/experience.vue'),
        meta:{
          title:'预约产品演示'
        }
      },
      {
        path: '/consultingService',
        name: 'consultingService',
        component: () => import(/* webpackChunkName: "about" */ '../views/consultingService/consultingService.vue'),
        meta:{
          title:'产业链咨询'
        }
      },
      {
        path: '/industryService',
        name: 'industryService',
        component: () => import(/* webpackChunkName: "about" */ '../views/consultingService/industryService.vue'),
        meta:{
          title:'产业服务'
        }
      },
      {
        path: '/industryInsight',
        name: 'industryInsight',
        component: () => import(/* webpackChunkName: "about" */ '../views/industryInsight/industryInsight.vue'),
        meta:{
          title:'产业链招商'
        }
      },
      {
        path: '/IndustryBrain',
        name: 'IndustryBrain',
        component: () => import(/* webpackChunkName: "about" */ '../views/industryInsight/IndustryBrain.vue'),
        meta:{
          title:'产业大脑'
        }
      },
      {
        path: '/about',
        name: 'about',
        component: () => import(/* webpackChunkName: "about" */ '../views/about/about.vue'),
        meta:{
          title:'中心及研究院'
        }
      },
      {
        path: '/news',
        name: 'news',
        component: () => import(/* webpackChunkName: "about" */ '../views/news/news.vue'),
        meta:{
          title:'产业链资讯',
          keep:true
        }
      },
      {
        path: '/detail',
        name: 'detail',
        component: () => import(/* webpackChunkName: "about" */ '../views/news/detail.vue'),
        meta:{
          title:'详情'
        }
      },
    ]
  },
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router
